home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / EXTRPTH$.DMO < prev    next >
Text File  |  1996-07-04  |  2KB  |  52 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   EXTRPTH$.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB01.INC"
  22. $INCLUDE "DAS-NB02.INC"
  23. COLOR 7,0
  24. CLS
  25.  
  26. ? "┌────────────────────────────────────────────────────────
  27. ? "│ fEXTACTpath$ (FileSpec$)
  28. ? "│ fEXTRACText$ (FileSpec$)
  29. ? "│ fSTRIPpath$  (FileSpec$)
  30. ? "│ fSTRIPext$   (FileSpec$)
  31. ? "├────────────────────────────────────────────────────────────────
  32. ? "│ These 4 little functions provide some ready made file name parsing.
  33. ? "│ There isn't much to them so we'll just get on with it.
  34. ? "└──────────────────────────────────────────────────────────────────────
  35. ?
  36.  
  37. FileSpec$ = "C:\PBL\NB02\UNT\STRPEXT$.UNT"
  38.  
  39. PRINT "FileSpec$ = "; CHR$(34); FileSpec$; CHR$(34)
  40. PRINT
  41. F$ = fEXTRACTpath$( FileSpec$ )
  42. PRINT "fEXTRACTpath$( FileSpec$ ) returns "; CHR$(34); F$; CHR$(34)
  43.  
  44. F$ = fEXTRACText$( FileSpec$ )
  45. PRINT "fEXTRACText$ ( FileSpec$ ) returns "; CHR$(34); F$; CHR$(34)
  46.  
  47. F$ = fSTRIPpath$( FileSpec$ )
  48. PRINT "fSTRIPpath$  ( FileSpec$ ) returns "; CHR$(34); F$; CHR$(34)
  49.  
  50. F$ = fSTRIPext$( FileSpec$ )
  51. PRINT "fSTRIPext$   ( FileSpec$ ) returns "; CHR$(34); F$; CHR$(34)
  52.